import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/views/Login'
import Home from '@/views/home'
import AddExercise from '@/views/exercises/AddExercise'
import ExerciseForm from '@/views/exercises/Exercise-form'
import Dashboard from '@/views/Dashboard'
import adminMessage from '@/views/administrator/adminMessage'
import dictionaryForm from '@/views/dictionary/dictionaryForm'
import feedback from '@/views/feedback/Feedback'
import information from '@/views/information/information'
import role from '@/views/management/role'
import PersonnelAndManagement from '@/views/management/PersonnelAndManagement'
import HandleEnterpriseList from '@/views/companies/HandleEnterpriseList'
import AdministratorCompanyList from '@/views/companies/AdministratorCompanyList'
import role2 from '@/views/management/role2'

Vue.use(Router)
export default new Router({
  routes: [{
    name: 'home',
    path: '/',
    component: Home,
    children: [{
      name: 'index',
      path: '/index',
      component: Dashboard
    },
    {
      name: 'addExercise',
      path: '/exercise/addExercise',
      component: AddExercise
    },
    {
      name: 'exerciseForm',
      path: 'exercise/exerciseForm',
      component: ExerciseForm
    },
    {
      name: 'adminMessage',
      path: 'administrator/adminMessage',
      component: adminMessage
    },
    {
      name: 'dictionary',
      path: 'dictionary/dictionaryForm',
      component: dictionaryForm
    },
    {
      name: 'feedback',
      path: 'feedback/feedbackList',
      component: feedback
    },
    {
      name: 'information',
      path: 'information/information',
      component: information
    },
    {
      name: 'role',
      path: 'management/role',
      component: role
    },
    {
      name: 'PersonnelAndManagement',
      path: 'management/PersonnelAndManagement',
      component: PersonnelAndManagement
    },
    {
      name: 'HandleEnterpriseList',
      path: 'companies/HandleEnterpriseList',
      component: HandleEnterpriseList
    },
    {
      name: 'AdministratorCompanyList',
      path: 'companies/AdministratorCompanyList',
      component: AdministratorCompanyList
    },
    {
      name: 'role2',
      path: 'management/role2',
      component: role2
    }
    ]
  },
  {
    name: 'login',
    path: '/login',
    component: Login
  }
  ]
})
